﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
 <script src="../../Scripts/jquery-1.7.js" type="text/javascript"></script>
  <script language="javascript" type="text/javascript">

      jQuery(document).ready(function () {
          // alert('123');
          $("input[name=goi]").click(function () {
              //alert("!23");
              var s = $("#noidung").val();
              $.post("/Chat/insert", { description: s }, function (data) { });
              $("#noidung").attr("value", ""); 

          });
          $("#noidung").keypress(function (e) {
              if (e.which == 13) {
                  var s = $("#noidung").val();
                  $.post("/Chat/insert", { description: s }, function (data) { });
                  $("#noidung").attr("value", ""); 
              }
          });
          laynoidung();

      });
      function laynoidung() {
        $.post("/Chat/chatcontent", function (data) {
              document.getElementById('noidungchat').innerHTML = data;
          });
          setTimeout("laynoidung()", 500);
          };
        
   </script>
    <title>test</title>
</head>
<body>
 
    <div>
    <form id="form1" runat="server">
    	<CKEditor:CKEditorControl ID="CKEditor1" runat="server" Height="200" BasePath="~/ckeditor">
		&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;
		</CKEditor:CKEditorControl>
        </form>
   <% Html.RenderAction("Uploadfile", "download");%> 
    <% Html.RenderAction("Index", "Chat");%> 
    </div>
</body>
</html>
